{include file="layout/header" title="消息列表" /}
	<div class="view-body">
    {include file="layout/menu" /}
		<div class="view-product">
			<div class="company_identify">
				<div class="manage-head">
					<h6 class="padding-left manage-head-con">消息列表</h6>
				</div>

				<form class="layui-form" action="{:url('admin/News/index')}" method="post" name="mapForm">
					<div class="layui-form-item">
					    <label class="layui-form-label">状态</label>
					    <div class="layui-input-inline">
					      	<select name="status">
					        	<option value="0" >全部</option>
								<option value="1" >用户已阅读</option>
								<option value="2" >用户未阅读</option>
					        	<option value="3" >用户已删除</option>
					      	</select>
					    </div>
						<div class="layui-input-inline">
							<select name="type">
								<option value="0" >内容</option>
				        		<option value="1" >发信人</option>
								<option value="2" >收信人</option>
								
					      	</select>
					    </div>
							<div class="layui-input-inline">
					      	<input type="text" name="keyword" lay-verify="title" placeholder="请输入标题" class="layui-input">
					    </div>
							<div class="layui-input-inline">
					      	<button class="layui-btn layui-btn-primary">筛选</button>
					    </div>
					</div>
				</form>

				<div class="offcial-table tr-border table-margin clearfix">
					<div class="tr-th clearfix">
						<div class="th w5">选择</div>
						<div class="th w5">ID</div>
						<div class="th w10">发信人</div>
            <div class="th w10">收信人</div>
						<div class="th w25">内容</div>
						<div class="th w10">IP</div>
						<div class="th w10">发信时间</div>
						<div class="th w5">已读</div>
						<div class="th w10">状态</div>
						<div class="th w10">操作</div>
					</div>
						{volist name="msgs" id="v"}
						<div class="tr clearfix border-bottom-none">
							<div class="th w5">
								<input type="checkbox" name="ids" value="{$v.id}">
							</div>
							<div class="td w5">{$v.id}</div>
							<div class="td w10">{$v.send_user_id ? get_userinfo($v.send_user_id) : '【系统消息】'}</div>
							<div class="td w10">{:get_userinfo($v.receive_user_id)}</div>
							<div class="td w25" style="white-space: initial;line-height: 25px;">{$v.info}</div>
							<div class="td w10">{$v.act_ip}</div>
							<div class="td w10">{$v.add_time|date="Y-m-d H:i",###}</div>
							<div class="td w5">{$v.is_read ? "已读" : "未读"}</div>
							<div class="td w10">{$v.is_delete ? "用户已删除" : "正常"}</div>
							<div class="td w10">
								<a href="javascript:;" w="500px" h="450px" title="编辑" url="{:url('admin/News/editMsg',['id'=>$v['id']])}" class="layui-btn layui-btn-mini layui-btn-warm layui_iframe">编辑</a>
								<a href="{:url('admin/News/delMsg',['id'=>$v['id']])}" msg="确定删除？" class="layui-btn layui-btn-mini layui-btn-danger layui_confirm">删除</a>
							</div>
						</div>
						{/volist}
				</div>

				<div class="fl margin-top padding-big-left">
					<button class="layui-btn layui-btn-primary layui-btn-small select_all" style="margin-bottom: 8px;">全选</button>
					<button class="layui-btn layui-btn-primary layui-btn-small delete_all" url="{:url('admin/News/delMsg')}" style="margin-bottom: 8px;">批量删除</button>
				</div>

				<div class="fr padding-big-right">
					<div class="page">
						{$msgs->render()}
					</div>
				</div>

			</div>
		</div>
	</div>
	<script type="text/javascript">
		var formObj = new Form('mapForm');
	        formObj.init({$post});
	</script>
{include file="layout/footer" /}
